.class public Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;
.super Lcom/estrongs/android/pop/app/imageviewer/e;
.source "ImageViewTouch.java"


# instance fields
.field private A:Z

.field private B:Lcom/estrongs/android/pop/app/imageviewer/g;

.field private C:J

.field private final z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/e;-><init>(Landroid/content/Context;)V

    .line 2
    check-cast p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/pop/app/imageviewer/e;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 4
    check-cast p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    return-void
.end method


# virtual methods
.method protected c(FF)V
    .locals 4

    .line 1
    invoke-super {p0, p1, p2}, Lcom/estrongs/android/pop/app/imageviewer/e;->b(FF)V

    const/4 p2, 0x1

    .line 2
    invoke-virtual {p0, p2, p2}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    .line 3
    new-instance v0, Landroid/graphics/RectF;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/e;->p:Lcom/estrongs/android/pop/app/imageviewer/h;

    .line 4
    invoke-virtual {v1}, Lcom/estrongs/android/pop/app/imageviewer/h;->a()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    int-to-float v1, v1

    iget-object v2, p0, Lcom/estrongs/android/pop/app/imageviewer/e;->p:Lcom/estrongs/android/pop/app/imageviewer/h;

    .line 5
    invoke-virtual {v2}, Lcom/estrongs/android/pop/app/imageviewer/h;->a()Landroid/graphics/Bitmap;

    move-result-object v2

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    int-to-float v2, v2

    const/4 v3, 0x0

    invoke-direct {v0, v3, v3, v1, v2}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 6
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v1

    .line 7
    invoke-virtual {v1, v0}, Landroid/graphics/Matrix;->mapRect(Landroid/graphics/RectF;)Z

    .line 8
    iget v1, v0, Landroid/graphics/RectF;->left:F

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    const/high16 v2, 0x41a00000    # 20.0f

    cmpg-float v1, v1, v2

    if-gez v1, :cond_0

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->B:Lcom/estrongs/android/pop/app/imageviewer/g;

    if-eqz v1, :cond_0

    const/4 v3, 0x0

    .line 10
    invoke-interface {v1, v3, p1}, Lcom/estrongs/android/pop/app/imageviewer/g;->a(IF)V

    .line 11
    :cond_0
    iget v0, v0, Landroid/graphics/RectF;->right:F

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    invoke-virtual {p0}, Landroid/widget/ImageView;->getWidth()I

    move-result v1

    int-to-float v1, v1

    sub-float/2addr v0, v1

    cmpg-float v0, v0, v2

    if-gez v0, :cond_1

    .line 12
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->B:Lcom/estrongs/android/pop/app/imageviewer/g;

    if-eqz v0, :cond_1

    .line 13
    invoke-interface {v0, p2, p1}, Lcom/estrongs/android/pop/app/imageviewer/g;->a(IF)V

    :cond_1
    return-void
.end method

.method public bridge synthetic getBitmapHeight()I
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getBitmapHeight()I

    move-result v0

    return v0
.end method

.method public bridge synthetic getBitmapRotation()I
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getBitmapRotation()I

    move-result v0

    return v0
.end method

.method public bridge synthetic getBitmapWidth()I
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getBitmapWidth()I

    move-result v0

    return v0
.end method

.method public bridge synthetic getDefaultScale()F
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getDefaultScale()F

    move-result v0

    return v0
.end method

.method public getMaxZoom()F
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/android/pop/app/imageviewer/e;->s:F

    return v0
.end method

.method public bridge synthetic getScaledHeight()I
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getScaledHeight()I

    move-result v0

    return v0
.end method

.method public bridge synthetic getScaledWidth()I
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getScaledWidth()I

    move-result v0

    return v0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 15

    move-object v1, p0

    move/from16 v0, p1

    .line 1
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-boolean v2, v2, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->f:Z

    const/4 v3, 0x0

    if-eqz v2, :cond_0

    return v3

    .line 2
    :cond_0
    iget-boolean v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->A:Z

    if-nez v2, :cond_1

    const/16 v2, 0x13

    if-lt v0, v2, :cond_1

    const/16 v2, 0x16

    if-gt v0, v2, :cond_1

    .line 3
    invoke-super/range {p0 .. p2}, Lcom/estrongs/android/pop/app/imageviewer/e;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    return v0

    .line 4
    :cond_1
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget v4, v2, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->l:I

    const/16 v5, 0x43

    const/4 v6, -0x2

    const/4 v7, 0x1

    if-eq v0, v5, :cond_8

    const-wide/16 v8, 0x1f4

    const/high16 v5, 0x3f800000    # 1.0f

    const/4 v12, 0x0

    packed-switch v0, :pswitch_data_0

    goto/16 :goto_4

    .line 5
    :pswitch_0
    :try_start_0
    invoke-virtual {v2}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->B()Z

    move-result v2

    if-eqz v2, :cond_9

    .line 6
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v2, v2, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->m:Les/dm;

    iget-object v3, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget v3, v3, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->l:I

    .line 7
    invoke-interface {v2, v3}, Les/dm;->b(I)Les/cm;

    move-result-object v2

    .line 8
    iget-object v3, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    const/4 v4, -0x1

    new-instance v5, Landroid/content/Intent;

    invoke-direct {v5}, Landroid/content/Intent;-><init>()V

    .line 9
    invoke-interface {v2}, Les/cm;->g()Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v5, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    move-result-object v2

    .line 10
    invoke-virtual {v3, v4, v2}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V

    .line 11
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v2}, Landroid/app/Activity;->finish()V

    goto/16 :goto_4

    .line 12
    :pswitch_1
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getScale()F

    move-result v0

    cmpg-float v0, v0, v5

    if-gtz v0, :cond_2

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getEventTime()J

    move-result-wide v13

    iget-wide v10, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->C:J
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_3

    cmp-long v0, v13, v10

    if-ltz v0, :cond_2

    add-int/2addr v4, v7

    .line 13
    :try_start_1
    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getEventTime()J

    move-result-wide v2

    add-long/2addr v2, v8

    iput-wide v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->C:J
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    goto :goto_0

    :cond_2
    const/high16 v0, -0x3e600000    # -20.0f

    .line 14
    :try_start_2
    invoke-virtual {p0, v0, v12}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(FF)V

    .line 15
    invoke-virtual {p0, v7, v3}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_3

    const/4 v4, -0x2

    :goto_0
    if-ltz v4, :cond_3

    .line 16
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v0, v0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->m:Les/dm;

    .line 17
    invoke-interface {v0}, Les/dm;->getCount()I

    move-result v0

    if-ge v4, v0, :cond_3

    .line 18
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    monitor-enter v2

    .line 19
    :try_start_3
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v0, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->i(I)V

    .line 20
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v0, v4, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->a(IZ)V

    .line 21
    monitor-exit v2

    goto :goto_1

    :catchall_0
    move-exception v0

    monitor-exit v2
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v0

    :cond_3
    if-eq v4, v6, :cond_4

    .line 22
    invoke-virtual {p0, v7, v7}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    :cond_4
    :goto_1
    return v7

    .line 23
    :pswitch_2
    :try_start_4
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/imageviewer/e;->getScale()F

    move-result v0

    cmpg-float v0, v0, v5

    if-gtz v0, :cond_5

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getEventTime()J

    move-result-wide v13

    iget-wide v11, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->C:J
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_3

    cmp-long v0, v13, v11

    if-ltz v0, :cond_5

    sub-int/2addr v4, v7

    .line 24
    :try_start_5
    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getEventTime()J

    move-result-wide v2

    add-long/2addr v2, v8

    iput-wide v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->C:J
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    goto :goto_2

    :catchall_1
    move-exception v0

    goto :goto_5

    :cond_5
    const/high16 v0, 0x41a00000    # 20.0f

    const/4 v2, 0x0

    .line 25
    :try_start_6
    invoke-virtual {p0, v0, v2}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(FF)V

    .line 26
    invoke-virtual {p0, v7, v3}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_3

    const/4 v4, -0x2

    :goto_2
    if-ltz v4, :cond_6

    .line 27
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v0, v0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->m:Les/dm;

    .line 28
    invoke-interface {v0}, Les/dm;->getCount()I

    move-result v0

    if-ge v4, v0, :cond_6

    .line 29
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    monitor-enter v2

    .line 30
    :try_start_7
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v0, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->i(I)V

    .line 31
    iget-object v0, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v0, v4, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->a(IZ)V

    .line 32
    monitor-exit v2

    goto :goto_3

    :catchall_2
    move-exception v0

    monitor-exit v2
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_2

    throw v0

    :cond_6
    if-eq v4, v6, :cond_7

    .line 33
    invoke-virtual {p0, v7, v7}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    :cond_7
    :goto_3
    return v7

    :pswitch_3
    const/high16 v0, -0x3e600000    # -20.0f

    const/4 v2, 0x0

    .line 34
    :try_start_8
    invoke-virtual {p0, v2, v0}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(FF)V

    .line 35
    invoke-virtual {p0, v3, v7}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    return v7

    :pswitch_4
    const/high16 v0, 0x41a00000    # 20.0f

    const/4 v2, 0x0

    .line 36
    invoke-virtual {p0, v2, v0}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(FF)V

    .line 37
    invoke-virtual {p0, v3, v7}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    return v7

    :catchall_3
    move-exception v0

    const/4 v4, -0x2

    goto :goto_5

    .line 38
    :cond_8
    iget-object v3, v2, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->K:Ljava/lang/Runnable;

    .line 39
    invoke-virtual {v2}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->A()Les/cm;

    move-result-object v4

    .line 40
    invoke-static {v2, v3, v4}, Lcom/estrongs/android/pop/app/imageviewer/f;->a(Landroid/app/Activity;Ljava/lang/Runnable;Les/cm;)V
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_3

    .line 41
    :cond_9
    :goto_4
    invoke-super/range {p0 .. p2}, Lcom/estrongs/android/pop/app/imageviewer/e;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    return v0

    :goto_5
    if-ltz v4, :cond_b

    .line 42
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v2, v2, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->m:Les/dm;

    .line 43
    invoke-interface {v2}, Les/dm;->getCount()I

    move-result v2

    if-lt v4, v2, :cond_a

    goto :goto_6

    .line 44
    :cond_a
    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    monitor-enter v2

    .line 45
    :try_start_9
    iget-object v3, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v3, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->i(I)V

    .line 46
    iget-object v3, v1, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->z:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-virtual {v3, v4, v7}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->a(IZ)V

    .line 47
    monitor-exit v2

    goto :goto_7

    :catchall_4
    move-exception v0

    monitor-exit v2
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_4

    throw v0

    :cond_b
    :goto_6
    if-eq v4, v6, :cond_c

    .line 48
    invoke-virtual {p0, v7, v7}, Lcom/estrongs/android/pop/app/imageviewer/e;->a(ZZ)V

    .line 49
    :cond_c
    :goto_7
    throw v0

    nop

    :pswitch_data_0
    .packed-switch 0x13
        :pswitch_4
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public bridge synthetic setBitmapRotation(I)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/e;->setBitmapRotation(I)V

    return-void
.end method

.method public setEnableTrackballScroll(Z)V
    .locals 0

    .line 1
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->A:Z

    return-void
.end method

.method public bridge synthetic setImageBitmap(Landroid/graphics/Bitmap;)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/e;->setImageBitmap(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public setOnImageEdgeDetector(Lcom/estrongs/android/pop/app/imageviewer/g;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->B:Lcom/estrongs/android/pop/app/imageviewer/g;

    return-void
.end method

.method public bridge synthetic setRecycler(Lcom/estrongs/android/pop/app/imageviewer/e$c;)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/e;->setRecycler(Lcom/estrongs/android/pop/app/imageviewer/e$c;)V

    return-void
.end method
